﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BBPA.BLL
{
    public partial class SMS
    {
        public void NewSMS(int ReceiveUserID_, string TheContent_)
        {
                BLL.PAUser bllPAUser = new PAUser();
                Model.PAUser modelPAUser = bllPAUser.GetModel(ReceiveUserID_);
                if (modelPAUser.Mobile != "")
                {
                    //modelMessage._SMS2Mobile = modelPAUser.Mobile;
                    //
                    BLL.SMS bllSMS = new SMS();
                    Model.SMS modelSMS = new Model.SMS();
                    modelSMS.UserID = ReceiveUserID_;
                    modelSMS._Username = modelPAUser.Username;
                    modelSMS._Mobile = modelPAUser.Mobile;
                    modelSMS.TheContent = TheContent_;
                    bllSMS.Add(modelSMS);
                }
        }
        public void NewSMS(string ReceiveUserIDStr_, string TheContent_)
        {
            foreach (string ReceiveUserID in ReceiveUserIDStr_.Split(',')) NewSMS(DataTypePlus.requestInt(ReceiveUserID), TheContent_);
        }
        
    }
}
